<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<form id="pagerForm" method="post" action="goodstype/select.do">
	<input type="hidden" name="pageNum" value="${requestScope.condition.pageNum}" />
	<input type="hidden" name="numPerPage" value="${requestScope.condition.numPerPage}" />
	<input type="hidden" name="name" value="${requestScope.condition.name}" />
	<input type="hidden" name="code" value="${requestScope.condition.code}" />
	<input type="hidden" name="operid" value="${requestScope.condition.operid}" />

	
</form>


<div class="pageHeader">
	<form onsubmit="return navTabSearch(this);" action="goodstype/select.do" method="post">
	<input type="hidden" name="operid" value="${requestScope.condition.operid}" />
	<div class="searchBar">
		<table class="searchContent">
			<tr>
				<td>
					商品名称：<input type="text" name="name"  value="${requestScope.condition.name}"/>
				</td>
				<td>
					商品编号：<input type="text" name="code"  value="${requestScope.condition.code}"/>
				</td>
			</tr>
		</table>
		<div class="subBar">
			<ul>
				<li><div class="buttonActive"><div class="buttonContent"><button type="submit">查询</button></div></div></li>
			</ul>
		</div>
	</div>
	</form>
</div>
<div class="pageContent">
	<div class="panelBar">
		<ul class="toolBar">
		
		<c:if test="${requestScope.add!=null }">
		<li><a class="add" href="goodstype/pop.do" target="dialog" mask="true" title="新增品类信息" ><span>${requestScope.add }</span></a></li>
		</c:if>
		
		<c:if test="${requestScope.add==null }">
		<li><a class="add" href="javascript:void(0)" disabled = 'true'><span style="color:gray">增加</span></a></li>
		</c:if>
		
		<c:if test="${requestScope.del!=null }">
		<li><a class="delete" href="goodstype/delete.do" target="selectedTodo" rel="ids" title="确定要删除吗?"><span>${requestScope.del }</span></a></li>
		</c:if>
		
		<c:if test="${requestScope.del==null }">
		<li><a class="delete" href="javascript:void(0)" disabled = 'true'><span style="color:gray">删除</span></a></li>
		</c:if>
		<li class="line">line</li>
		<li><a class="icon" href="goodstype/export.do" target="dwzExport" targetType="navTab" title="实要导出这些记录吗?"><span>导出EXCEL</span></a></li>
		</ul>
	</div>
	<table class="table" width="100%" layoutH="138">
		<thead>
			<tr>
				<th width="20"></th>
				<th width="20"></th>
				<th width="100">商品编码</th>
				<th>商品名称</th>
				<th width="100">厂家</th>
				<th width="50">单价</th>
				<th width="80" align="center">商品类型</th>
				<th width="80">单位</th>
				<th width="80">创建时间</th>
				<th width="80" align="center">操作</th>
			</tr>
		</thead>
		<tbody>
			<c:forEach items="${requestScope.goodstype }" var="good" varStatus="status">
				<tr>
				<td>${status.index+1 }</td>
				<td><input type="checkbox" name="ids" value="${good.id}"></td>
				<td>${good.code}</td>
				<td>${good.name}</td>
				<td>${good.factory}</td>
				<td>${good.price}</td>
				<td>${good.type}</td>
				<td>${good.unit}</td>
				<td>${good.create_time}</td>
				<c:if test="${requestScope.update!=null }">
					<td><a class="edit" href="goodstype/updatepop.do?id=${good.id}" target="dialog" mask="true" title="修改品类信息"><span>${requestScope.update }</span></a></td>
				</c:if>
				<c:if test="${requestScope.update==null }">
				<td><a class="edit" href="javascript:void(0)" disabled = 'true'><span style="color:gray">修改</span></a></td>
				</c:if>
				</tr>
			</c:forEach>
			
		</tbody>
	</table>
	<div class="panelBar">
		<div class="pages">
			<span>显示</span>
			<select name="numPerPage" onchange="navTabPageBreak({numPerPage:this.value})">
				<option value="10">10</option>
				<option value="20">20</option>
				<option value="50">50</option>
			</select>
			<span>条，共${requestScope.condition.totalCount}条</span>
		</div>
		
		<div class="pagination" targetType="navTab" totalCount="${requestScope.condition.totalCount}" numPerPage="${requestScope.condition.numPerPage}" pageNumShown="5" currentPage="${requestScope.condition.pageNum}"></div>
	</div>

	</div>

